package com.service;

import com.mypg.Question;
import com.mypg.UserQuestion;
import com.mypg.UserRank;
import com.mypg.WrongChapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserQuestionService {
    List<UserQuestion> selectAllUserQuestion();
    int selectUserQuestion_count();
    UserQuestion selectUserQuestionByUserQuestion_id(int user_id , int question_id);
    List<UserQuestion> selectUserQuestion_for_user_question_table_jsp(String user_nickname, int question_id,
                                                                     int start_row,int page_nums);
    int selectUserQuestion_count_For_user_question_table_jsp(String user_nickname, int question_id);
    int selectCountByFlag_pass_and_user_id(int user_id,int flag_pass,String question_class,String question_chapter);
    List<WrongChapter> selectWrongChapterByUser_id(int user_id, int flag_pass,
                                                   String question_class);
    List<Question> selectWrongQuestionByUser_id(int user_id, String question_class, String question_chapter, int flag_pass);
    List<UserRank> selectUserRank();

    void deleteUserQuestionByUserQuestion_id(int user_id ,int question_id);

    void insertUserQuestion(UserQuestion userQuestion);

    void updateFlag_passByUser_id_and_question_id(int user_id,int question_id,int flag_pass);
    void updateUser_nicknameByUser_id(int user_id,String user_nickname);

}
